package com.dynamic.mybatis.core.toolkit;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import org.apache.ibatis.mapping.SqlCommandType;

/**
 * @Description
 * @Author xs
 * @Date 2021/3/26 9:44
 */
public class SqlCommandTypeHolder {

    public static SqlCommandType getSqlCommandType(String sqlCommandTypeName){
        if(StringUtils.isBlank(sqlCommandTypeName)){
            return null;
        }
        for(SqlCommandType sqlCommandType : SqlCommandType.values()){
            if(sqlCommandType.name().equals(sqlCommandTypeName.toUpperCase())){
                return  sqlCommandType;
            }
        }
        return null;
    }
}